<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

/*
Route::any('/wechat', 'WechatController@serve');

Route::group(['middleware' => ['wechat.oauth:snsapi_userinfo']], function () {
    Route::get('/user', function () {
        $user = session('wechat.oauth_user'); // 拿到授权用户资料

        dd($user);
    });

});*/

/*登陆页*/
Route::get('/', ['uses'=>'HomeController@index', 'as'=>'index']);

/*答题页*/
Route::get('/exam', ['uses'=>'HomeController@exam', 'as'=>'exam']);

/*结果页*/
Route::get('/score', ['uses'=>'HomeController@score', 'as'=>'score']);

/*提交答案*/
Route::post('/exam', ['uses'=>'HomeController@make_score', 'as'=>'make_score']);


